class ShoppingList:
    #{"牙刷":5,"毛巾":5,"牙膏":10}
    def __init__(self,shopping_list):
        self.shopping_list=shopping_list

    #返回清单上多少个商品
    def get_item(self):
        return len(self.shopping_list)

    #返回清单商品价格总额数字
    def get_total_price(self):
        total_price=0
        i=0
        if i<len(self.shopping_list):
            for price in self.shopping_list.values():
                total_price=total_price+price
            i=i+1
        return total_price

